<?php get_header(); ?>
	<div id="floatswrap" class="clearfix noprint">
		<div id="featured_holder">
			<div class="outer">
				<div class="inner">
					<img src="<?php bloginfo('wpurl'); ?>/wp-content/themes/<?php echo get_option('wps_child_theme'); ?>/images/<?php echo $post->post_name; ?>.jpg" alt="<?php the_title(); ?>" />
				</div><!-- inner -->
			</div><!-- outer -->
		</div><!-- featured_holder -->
			
		<?php include(TEMPLATEPATH.'/top_sidebar.php');  ?>			
						
		<div id="breadcrumb" class="noprint">
			<?php if(class_exists('bcn_breadcrumb_trail'))
				{
					//Make new breadcrumb object
					$breadcrumb_trail = new bcn_breadcrumb_trail;
					//Setup options here if needed
					$breadcrumb_trail->opt['home_title'] = "Home";
					//Fill the breadcrumb trail
					$breadcrumb_trail->fill();
					//Display the trail
					$breadcrumb_trail->display();
				}
			?>
		</div><!-- breadcrumb -->				
		<div id="main_col" class="clearfix">
			
		
			<!-- ##############################when it's the Contact page ###############################################-->
			<?php if(is_page('contact')) { ?>
				
					<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
							
						<div class="post contact_post" id="post-<?php the_ID(); ?>">
							<h2 class="title"><?php the_title(); ?></h2>
							<?php the_content(); ?>
						</div><!-- contact_post -->
					<?php endwhile; endif; ?>
					
					<!--  Remove this if you decide to use a different contact form plugin -->
					<?php
						if(!function_exists('gbcf_show')) {
							    echo "
								
								<h4>No contact form?</h4>
								<p>
									Install the 'Secure and Accessible PHP Contact Form v.2.0WP' plugin.<br/>
									Available e.g. here:  
									<a href='http://green-beast.com/blog/?page_id=136' target='_blank'>www.green-beast.com</a>
								</p>
								";
						}
						else {
							gbcf_show();
						}
					?>
			<!-- ##############################when it's  any other page ###############################################-->
			<?php } else { ?>
			
				<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
							
					<div class="<?php 
						if($post->post_parent)
							$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); 
						else
							$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
								if ($children) { ?> post narrow<?php } 
								else { ?>post wide<?php } ?>" id="post-<?php the_ID(); ?>">
						<h2 class="title"><?php the_title(); ?></h2>
							
						<?php the_content(); ?>
							
					</div><!-- post_help -->
				<?php endwhile; endif; ?>
					
				<?php if ($children) { ?>
					<div id="subpg_sidebar" class="noprint">
						<div class="outer">
							<div class="inner">
								<h3>In this section:</h3>
								<ul><?php echo $children; ?></ul>
							</div><!-- inner -->
						</div><!-- outer -->
					</div><!-- subpg_sidebar -->
				<?php } else {} ?>
			<?php } ?>
		</div><!-- main_col -->
	</div><!-- end floatswrap --> 
<?php get_footer(); ?>